Integrand size = 28, antiderivative size = 103 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=-\frac {2 a b \cos ^5(c+d x)}{5 d}+\frac {a^2 \sin (c+d x)}{d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}+\frac {b^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \sin ^5(c+d x)}{5 d}-\frac {b^2 \sin ^5(c+d x)}{5 d} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3169, 2713, 2645, 30, 2644, 14} \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=\frac {a^2 \sin ^5(c+d x)}{5 d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \sin (c+d x)}{d}-\frac {2 a b \cos ^5(c+d x)}{5 d}-\frac {b^2 \sin ^5(c+d x)}{5 d}+\frac {b^2 \sin ^3(c+d x)}{3 d} \]
[In]
[Out]
Rule 14
Rule 30
Rule 2644
Rule 2645
Rule 2713
Rule 3169
Rubi steps \begin{align*} \text {integral}& = \int \left (a^2 \cos ^5(c+d x)+2 a b \cos ^4(c+d x) \sin (c+d x)+b^2 \cos ^3(c+d x) \sin ^2(c+d x)\right ) \, dx \\ & = a^2 \int \cos ^5(c+d x) \, dx+(2 a b) \int \cos ^4(c+d x) \sin (c+d x) \, dx+b^2 \int \cos ^3(c+d x) \sin ^2(c+d x) \, dx \\ & = -\frac {a^2 \text {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{d}-\frac {(2 a b) \text {Subst}\left (\int x^4 \, dx,x,\cos (c+d x)\right )}{d}+\frac {b^2 \text {Subst}\left (\int x^2 \left (1-x^2\right ) \, dx,x,\sin (c+d x)\right )}{d} \\ & = -\frac {2 a b \cos ^5(c+d x)}{5 d}+\frac {a^2 \sin (c+d x)}{d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \sin ^5(c+d x)}{5 d}+\frac {b^2 \text {Subst}\left (\int \left (x^2-x^4\right ) \, dx,x,\sin (c+d x)\right )}{d} \\ & = -\frac {2 a b \cos ^5(c+d x)}{5 d}+\frac {a^2 \sin (c+d x)}{d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}+\frac {b^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \sin ^5(c+d x)}{5 d}-\frac {b^2 \sin ^5(c+d x)}{5 d} \\ \end{align*}
Time = 0.18 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.67 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=\frac {-6 a b \cos ^5(c+d x)+15 a^2 \sin (c+d x)+5 \left (-2 a^2+b^2\right ) \sin ^3(c+d x)+3 \left (a^2-b^2\right ) \sin ^5(c+d x)}{15 d} \]
[In]
[Out]
Time = 0.97 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.77
method | result | size |
parts | \(\frac {a^{2} \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5 d}+\frac {b^{2} \left (-\frac {\sin \left (d x +c \right )^{5}}{5}+\frac {\sin \left (d x +c \right )^{3}}{3}\right )}{d}-\frac {2 a b \cos \left (d x +c \right )^{5}}{5 d}\) | \(79\) |
derivativedivides | \(\frac {\frac {a^{2} \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}-\frac {2 a b \cos \left (d x +c \right )^{5}}{5}+b^{2} \left (-\frac {\cos \left (d x +c \right )^{4} \sin \left (d x +c \right )}{5}+\frac {\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{15}\right )}{d}\) | \(88\) |
default | \(\frac {\frac {a^{2} \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}-\frac {2 a b \cos \left (d x +c \right )^{5}}{5}+b^{2} \left (-\frac {\cos \left (d x +c \right )^{4} \sin \left (d x +c \right )}{5}+\frac {\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{15}\right )}{d}\) | \(88\) |
risch | \(-\frac {a b \cos \left (d x +c \right )}{4 d}+\frac {5 a^{2} \sin \left (d x +c \right )}{8 d}+\frac {b^{2} \sin \left (d x +c \right )}{8 d}-\frac {a b \cos \left (5 d x +5 c \right )}{40 d}+\frac {\sin \left (5 d x +5 c \right ) a^{2}}{80 d}-\frac {\sin \left (5 d x +5 c \right ) b^{2}}{80 d}-\frac {a b \cos \left (3 d x +3 c \right )}{8 d}+\frac {5 \sin \left (3 d x +3 c \right ) a^{2}}{48 d}-\frac {\sin \left (3 d x +3 c \right ) b^{2}}{48 d}\) | \(143\) |
parallelrisch | \(\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9} a^{2}-4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} a b +\frac {8 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3}+\frac {4 \left (29 a^{2}-4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15}-8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a b +\frac {8 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}+2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {4 a b}{5}}{d \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}\) | \(150\) |
norman | \(\frac {-\frac {4 a b}{5 d}+\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}+\frac {8 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}+\frac {8 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}+\frac {4 \left (29 a^{2}-4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15 d}-\frac {8 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}-\frac {4 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}\) | \(170\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.72 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=-\frac {6 \, a b \cos \left (d x + c\right )^{5} - {\left (3 \, {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} + 8 \, a^{2} + 2 \, b^{2}\right )} \sin \left (d x + c\right )}{15 \, d} \]
[In]
[Out]
Time = 0.24 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.34 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=\begin {cases} \frac {8 a^{2} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 a^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {a^{2} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} - \frac {2 a b \cos ^{5}{\left (c + d x \right )}}{5 d} + \frac {2 b^{2} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (a \cos {\left (c \right )} + b \sin {\left (c \right )}\right )^{2} \cos ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.75 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=-\frac {6 \, a b \cos \left (d x + c\right )^{5} - {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} a^{2} + {\left (3 \, \sin \left (d x + c\right )^{5} - 5 \, \sin \left (d x + c\right )^{3}\right )} b^{2}}{15 \, d} \]
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.11 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=-\frac {a b \cos \left (5 \, d x + 5 \, c\right )}{40 \, d} - \frac {a b \cos \left (3 \, d x + 3 \, c\right )}{8 \, d} - \frac {a b \cos \left (d x + c\right )}{4 \, d} + \frac {{\left (a^{2} - b^{2}\right )} \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac {{\left (5 \, a^{2} - b^{2}\right )} \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac {{\left (5 \, a^{2} + b^{2}\right )} \sin \left (d x + c\right )}{8 \, d} \]
[In]
[Out]
Time = 21.69 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.12 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=\frac {2\,\left (\frac {3\,\sin \left (c+d\,x\right )\,a^2\,{\cos \left (c+d\,x\right )}^4}{2}+2\,\sin \left (c+d\,x\right )\,a^2\,{\cos \left (c+d\,x\right )}^2+4\,\sin \left (c+d\,x\right )\,a^2-3\,a\,b\,{\cos \left (c+d\,x\right )}^5-\frac {3\,\sin \left (c+d\,x\right )\,b^2\,{\cos \left (c+d\,x\right )}^4}{2}+\frac {\sin \left (c+d\,x\right )\,b^2\,{\cos \left (c+d\,x\right )}^2}{2}+\sin \left (c+d\,x\right )\,b^2\right )}{15\,d} \]
[In]
[Out]